<template>
	<view class="container">
	  <view :class="sAside?'':'noscroll'">
	    <view class="search">
	      <view class="search-area">
	        <input type="text" placeholder="输入汽车名称"></input>
	        <button>搜索</button>
	      </view>
	    </view>
	
	    <view class="orderarea">
	      <text>销量</text>
	      <text>价格</text>
	      <text>评价</text>
	      <text class="ocategory" bindtap="showAside">品牌</text>
	      <text :class="'iconfont '+sList?'icon-zonghe':'icon-listview'" bindtap="changeList"></text>
	    </view>
	    <view :class="'pitems '+sList?'plist':''">
	      <view class="p-item">
	        <navigator url="/pages/product/product">
	          <image src="/static/p1.jpg" mode="widthFix"></image>
	          <text class="pname">奔驰A级 2019款 A180 L</text>
	          <text>￥22,46</text>
	        </navigator>
	      </view>
	      <view class="p-item">
	        <navigator url="/pages/product/product">
	          <image src="/static/p2.jpg" mode="widthFix"></image>
	          <text class="pname">奔驰A级 2019款 A180 L</text>
	          <text>￥232,460</text>
	        </navigator>
	      </view>
	      <view class="p-item">
	        <navigator url="/pages/product/product">
	          <image src="/static/p2.jpg" mode="widthFix"></image>
	          <text class="pname">奔驰A级 2019款 A180 L</text>
	          <text>￥232,460</text>
	        </navigator>
	      </view>
	      <view class="p-item">
	        <navigator url="/pages/product/product">
	          <image src="/static/p3.jpg" mode="widthFix"></image>
	          <text class="pname">奔驰A级 2019款 A180 L</text>
	          <text>￥232,460</text>
	        </navigator>
	      </view>
	      <view class="p-item">
	        <navigator url="/pages/product/product">
	          <image src="/static/p4.jpg" mode="widthFix"></image>
	          <text class="pname">奔驰A级 2019款 A180 L</text>
	          <text>￥232,460</text>
	        </navigator>
	      </view>
	      <view class="p-item">
	        <navigator url="/pages/product/product">
	          <image src="/static/p5.jpg" mode="widthFix"></image>
	          <text class="pname">奔驰A级 2019款 A180 L</text>
	          <text>￥232,460</text>
	        </navigator>
	      </view>
	      <view class="p-item">
	        <navigator url="/pages/product/product">
	          <image src="/static/p5.jpg" mode="widthFix"></image>
	          <text class="pname">奔驰A级 2019款 A180 L</text>
	          <text>￥232,460</text>
	        </navigator>
	      </view>
	      <view class="p-item">
	        <navigator url="/pages/product/product">
	          <image src="/static/p5.jpg" mode="widthFix"></image>
	          <text class="pname">奔驰A级 2019款 A180 L</text>
	          <text>￥232,460</text>
	        </navigator>
	      </view>
	    </view>
	  </view>
	  <view :class="'mark '+sAside?'closemark':''">
	    <view class="iconfont icon-next close" bindtap="showAside"></view>
	    <scroll-view scroll-y="true" :style="'height:'+winHeight+'px'">
	
	      <view class="aside-clist">
	
	        <view>
	          <image mode="widthFix" src="/static/brand1.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand2.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand3.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand4.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand5.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand6.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand7.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand1.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand2.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand3.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand4.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand5.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand6.png" />
	          <text>北京现代</text>
	        </view>
	        <view>
	          <image mode="widthFix" src="/static/brand7.png" />
	          <text>北京现代</text>
	        </view>
	      </view>
	    </scroll-view>
	  </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				winHeight:0,
				    sAside:true,
				    sList:true
			}
		},
		methods: {
			
		}
	}
</script>

<style>
.cproductlist {
  display: flex;
}

.clist {
  width: 25%;
  background-color:#F8F8FF;
 
}
.clist .citems{
    display: flex;
    flex-direction:column;
    height: 100%;
}
.clist text{
   font-size: 28rpx;
  line-height: 80rpx;
  text-align: center;
}
.clist .cur{
  background-color: white;
}

.productlist {
  flex: 1;
}
.pitems{
  width:100%;
display: flex;
flex-direction: row;
flex-wrap:wrap;
  align-content: flex-start;
  justify-content: space-evenly;
  height: 100%;
  border-radius: 8rpx;
}

.p-item {
  width: 45%;
  margin: 8rpx 0;
   box-shadow: 0 0 8rpx #eeeded;
}

.p-item navigator {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.p-item text{
  text-align: center;
  font-size: 24rpx;
  padding:16rpx;
  width:100%;
  white-space:nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.p-item image {
  width: 100%;
}
.container {
  width: vw;
  overflow: hidden;
}

.orderarea {
  display: flex;
  flex-direction: row;
  border-bottom: 1px solid #ccc;
}

.orderarea text {
  width: 20%;
  line-height: 80rpx;
  font-size: 28rpx;
  text-align: center;
}

.orderarea text:after {
  content: "";
  display: inline-block;
  line-height: 0;
  width: 0;
  height: 0;
  border-left: 12rpx solid transparent;
  border-top: 12rpx solid #d81e06;
  border-right: 12rpx solid transparent;
}

.orderarea text:nth-child(4):after, .orderarea text:last-child:after {
  display: none;
}

.orderarea text:last-child::before {
  font-size: 40rpx;
}

.plist {
  display: flex;
  flex-direction: column;
}

.plist .p-item {
  width: 90%;
  margin: 16rpx 5%;
}

.plist .p-item text:last-child:after {
  content: "\e6a2";
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.plist navigator {
  display: flex;
  flex-direction: row;
}

.plist .pname {
  text-align: left;
  font-weight: 600;
  white-space: normal;
  overflow: hidden;
}

.mark {
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 10;
  transition: all 0.5s;
  opacity: 1;
}

.closemark {
  opacity: 0;
  right: -100%;
}

.closemark .close {
  display: none;
}

.aside-clist {
  margin-left: 20%;
  width: 80%;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
}

.aside-clist view {
  padding: 16rpx 32rpx;
  display: flex;
  flex-direction: row;
  border-bottom: 1px dotted #ccc;
  margin: 0 16rpx;
}

.aside-clist image {
  width: 78px;
}

.aside-clist text {
  line-height: 78px;
  font-size: 32rpx;
  padding-left: 32rpx;
  flex: 1;
}

.close {
  position: fixed;
  right: 80%;
  top: 50%;
  z-index: 100;
  margin-top: -60rpx;
  transition: all 1;
}

.close:before {
  width: 64rpx;
  height: 120rpx;
  border: 1px solid white;
  line-height: 120rpx;
  text-align: center;
  display: block;
  background-color: #fff;
  border-radius: 16rpx 0 0 16rpx;
}

.noscroll {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

</style>
